namespace CSharpPro._10._20;

public class Student
{
        public string Name { get; set; }
        public int Age { get; set; }
        public string StudentId { get; set; }
        public Student(string name, int age, string studentId)
        {
            Name = name;
            Age = age;
            StudentId = studentId;
        }
        public override string ToString()
        {
            return$"学生信息：姓名-{Name}，年龄-{Age}，学号-{StudentId}";
        }
    }

    class Program
    {
        static void Main(string[] args)
        {
            Student student = new Student("张三", 20, "S001");
            Console.WriteLine(student);
            Console.WriteLine($"姓名：{student.Name}");
            Console.WriteLine($"年龄：{student.Age}");
            Console.WriteLine($"学号：{student.StudentId}");

            Console.ReadKey();
        }
    }

     






